package com.lening.community.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lening.community.dto.StoreDto;
import com.lening.community.pojo.House;
import com.lening.community.pojo.Shops;
import com.lening.community.pojo.Store;
import com.lening.community.vo.GarageVo;
import com.lening.community.vo.StoreVo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @ToDo:
 * @Author：潘万法
 * @date: 2024/6/3 16:55
 */
public interface StoreMapper extends BaseMapper<Store> {
    Page<Store> page(StoreDto storeDto);

    /**
     * 导入
     *
     * @return
     */
    @Select("select * from store")
    List<Store> find();
    @Insert("INSERT into store(oid,build_name_id,community_id,fllor_num,store_num,build_area,use_area,house_statu_id," +
            "delete_id,yid,remarks) VALUES(#{oid},#{buildNameId},#{communityId},#{fllorNum},#{storeNum},#{buildArea},#{useArea},#{houseStatuId}," +
            "#{deleteId},#{yid},#{remarks})")
    int insert(Store store);

    /**
     * 详情
     * @param oid
     * @return
     */
    StoreVo getById(Long oid);
}
